.class final Lcom/mobisage/android/r;
.super Ljava/lang/Object;
.source "SourceFile"


# static fields
.field public static a:Ljava/lang/String;

.field public static b:Ljava/lang/String;

.field public static c:Ljava/lang/String;

.field public static d:Ljava/lang/String;

.field public static e:Ljava/lang/String;

.field public static f:Ljava/lang/String;

.field public static g:J

.field public static h:Landroid/content/Context;

.field private static i:Z


# direct methods
.method static constructor <clinit>()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 20
    const-string v0, ""

    sput-object v0, Lcom/mobisage/android/r;->a:Ljava/lang/String;

    .line 21
    const-string v0, ""

    sput-object v0, Lcom/mobisage/android/r;->b:Ljava/lang/String;

    .line 22
    const-string v0, ""

    sput-object v0, Lcom/mobisage/android/r;->c:Ljava/lang/String;

    .line 24
    const-string v0, ""

    sput-object v0, Lcom/mobisage/android/r;->d:Ljava/lang/String;

    .line 25
    sput-object v2, Lcom/mobisage/android/r;->e:Ljava/lang/String;

    .line 26
    sput-object v2, Lcom/mobisage/android/r;->f:Ljava/lang/String;

    .line 28
    const-wide/16 v0, 0x0

    sput-wide v0, Lcom/mobisage/android/r;->g:J

    .line 29
    const/4 v0, 0x0

    sput-boolean v0, Lcom/mobisage/android/r;->i:Z

    .line 31
    sput-object v2, Lcom/mobisage/android/r;->h:Landroid/content/Context;

    return-void
.end method

.method public static final a(Landroid/content/Context;)Z
    .locals 5
    .parameter

    .prologue
    .line 34
    sget-boolean v0, Lcom/mobisage/android/r;->i:Z

    if-eqz v0, :cond_0

    .line 35
    sget-boolean v0, Lcom/mobisage/android/r;->i:Z

    .line 65
    :goto_0
    return v0

    .line 37
    :cond_0
    invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    sput-object v0, Lcom/mobisage/android/r;->h:Landroid/content/Context;

    .line 38
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v0

    .line 41
    :try_start_0
    invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v1

    const/16 v2, 0x80

    invoke-virtual {v0, v1, v2}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;

    move-result-object v1

    .line 42
    iget-object v1, v1, Landroid/content/pm/ApplicationInfo;->metaData:Landroid/os/Bundle;

    .line 43
    const-string v2, "Mobisage_publishID"

    invoke-virtual {v1, v2}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 44
    sput-object v2, Lcom/mobisage/android/r;->a:Ljava/lang/String;

    if-nez v2, :cond_1

    .line 45
    const-string v2, ""

    sput-object v2, Lcom/mobisage/android/r;->a:Ljava/lang/String;

    .line 46
    :cond_1
    sget-object v2, Lcom/mobisage/android/r;->a:Ljava/lang/String;

    const-string v3, " "

    const-string v4, ""

    invoke-virtual {v2, v3, v4}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v2

    sput-object v2, Lcom/mobisage/android/r;->a:Ljava/lang/String;

    .line 48
    const-string v2, "Mobisage_channel"

    invoke-virtual {v1, v2}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 49
    sput-object v1, Lcom/mobisage/android/r;->b:Ljava/lang/String;

    if-nez v1, :cond_2

    .line 50
    const-string v1, ""

    sput-object v1, Lcom/mobisage/android/r;->b:Ljava/lang/String;

    .line 51
    :cond_2
    invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    .line 52
    invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object v1

    .line 53
    iget-object v1, v1, Landroid/content/pm/PackageInfo;->versionName:Ljava/lang/String;

    sput-object v1, Lcom/mobisage/android/r;->d:Ljava/lang/String;

    .line 54
    invoke-virtual {p0}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;

    move-result-object v1

    invoke-virtual {v1, v0}, Landroid/content/pm/ApplicationInfo;->loadLabel(Landroid/content/pm/PackageManager;)Ljava/lang/CharSequence;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/mobisage/android/r;->c:Ljava/lang/String;
    :try_end_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    .line 57
    :goto_1
    invoke-virtual {p0}, Landroid/content/Context;->getCacheDir()Ljava/io/File;

    move-result-object v0

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/mobisage/android/r;->e:Ljava/lang/String;

    .line 58
    invoke-virtual {p0}, Landroid/content/Context;->getFilesDir()Ljava/io/File;

    move-result-object v0

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/mobisage/android/r;->f:Ljava/lang/String;

    .line 61
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0x9

    if-lt v0, v1, :cond_3

    .line 62
    sget-object v0, Lcom/mobisage/android/r;->h:Landroid/content/Context;

    new-instance v1, Lcom/mobisage/android/p;

    invoke-direct {v1}, Lcom/mobisage/android/p;-><init>()V

    new-instance v2, Landroid/content/IntentFilter;

    const-string v3, "android.intent.action.DOWNLOAD_COMPLETE"

    invoke-direct {v2, v3}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 64
    :cond_3
    const/4 v0, 0x1

    .line 65
    sput-boolean v0, Lcom/mobisage/android/r;->i:Z

    goto/16 :goto_0

    .line 55
    :catch_0
    move-exception v0

    goto :goto_1
.end method
